Skip to content

Name the cheap-loop candidate fix without stating its outcome - #85

Merged
Pranav-Mathad merged 2 commits into
mainfrom
issue-82-cheap-loop-fix-wording
Nov 29, 2026
Merged

Pranav-Mathad merged 2 commits into
mainfrom
issue-82-cheap-loop-fix-wording

Conversation

@Pranav-Mathad

Copy link
Copy Markdown
Owner

Closes #82.

Why

The template wrote "Moving X removes the link." for every cheap loop. The tool's own simulation says otherwise for most of them, and since #81 the screen shows "Simulated: the link remains" next to that sentence.

Repo Cheap loops Simulated fix removes the link Link remains Not simulated
artemis 47 14 29 4
graylog 36 14 22 0
shopware 8 5 1 2

What changes

The sentence now names the candidate fix and leaves the outcome to the simulation line:

The candidate fix is to move {symbol} into {src}.

Two commits:

  1. Code and spec. src/codexray/report/templates.py (the cheap-loop fix text; action, symbol, from and to are unchanged), spec.md §8.7 (the example sentence), scripts/make_fixture_bundle.py and the two fixture bundles regenerated with make contracts. schemas/ and the generated web types came out unchanged.
  2. Published results. results/<id>/findings.json and web/public/bundles/<id>/findings.json for the three repositories, regenerated with codexray report from the final judged runs, so the published files are what the code produces.

Not changed: text written by the AI job, the simulation, the ranking, settings, and every other published file.

What I ran and saw

Only codexray report and the bundle step were run, with LLM_API_KEY unset. No other stage and no AI call.

  • Source runs. A private copy of the judged runs whose findings.json had the same sha256 as the files published on main before this change.

  • Second run. report twice per repository: findings.json and every JSON file under the run's web/ have the same sha256 both times.

  • Exactly six files changed in the second commit. manifest.json, decisions.yaml, usage.json, robustness.json, ARCHITECTURE_RULES.md, layouts.json, report.json, map.json, the index files and the code/ files are byte for byte what was committed.

  • Before against after, checked from the git diff:

    Repo Findings Cheap loops changed Fix text changed (template only) Summary changed, AI-judged
    artemis 257 47 34 13
    graylog 221 36 27 9
    shopware 213 8 5 3

    The order of finding ids, every priority, every simulation and every AI judgement are unchanged. Only summary and judgement.fix.text differ, only on cheap loops, and with the old and new sentence removed the strings are identical. results/ and the bundle hold the same bytes, and every finding names the same run as the manifest.

  • The old sentence is in 0 findings now (47, 36 and 8 before).

  • make check passes: ruff, 36 Python tests passed and 1 skipped, contracts up to date, typecheck, 4 web tests, build.

Example, artemis rank 62: "The candidate fix is to move LectureUnitCompletion into src/main/java/de/tum/cit/aet/artemis/account." Its simulation says the link remains, and the screen says so beside it.

Limits

  • The summary of an AI-judged cheap loop also changed (13, 9 and 3 findings). The summary is built from the template even when the AI wrote the judgement, so it carried the same sentence. The AI's own claim and fix text are untouched.
  • On those findings the summary names the template's candidate fix while "Proposed fix" shows the AI's suggestion, and the two can differ. That was already so before this change. Resolving it means changing how the report builds the summary and is not part of this pull request.
  • Two AI-written texts still say a fix "removes the link". artemis rank 7: the simulation agrees. shopware rank 69: the simulation says the link remains, and the screen says so beside it.
  • Not looked at on screen. The new sentence was read in the generated files, not in a browser.
  • An older research note, docs/research/Stages 5 and 6 analysis and LLM judge.md line 230, still has an early draft of the old sentence. It is a record of the design at that time and was left as it is.

@Pranav-Mathad
Pranav-Mathad merged commit 860268f into main Nov 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stop the cheap-loop fix sentence claiming the link is removed

1 participant